<!DOCTYPE HTML>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>

<%@ page import="net.tanesha.recaptcha.ReCaptcha" %>
<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory" %>
<html>
<head>
    <title>CAPTCHA in Java using reCAPTCHA</title>
    <!-- YUI -->
    <script type="text/javascript" src="lib/yui/3.14.0/build/yui/yui.js"></script>

    <!-- load code -->
    <script type="text/javascript" src="js/yui/loader.js"></script>
</head>
<body>
<h2>CAPTCHA in Java Application using reCAPTCHA</h2>
<form>
    <p>Username: <input type="text" name="user"></p>
    <p>Password: <input type="password" name="password"></p>
    <p>
        <%
            ReCaptcha c = ReCaptchaFactory.newSecureReCaptcha(
                    "6Lcx9P4SAAAAAFCAoq7yPOPwX9ZIjwi6520fUnCc",
                    "6Lcx9P4SAAAAAJccBqdw1bDEmuRJ1RxHrdTzlDuc", false);
            out.print(c.createRecaptchaHtml(null, null));
        %>
        <input id="iss_captcha" type="button" value="submit" />
    </p>
</form>
</body>
</html>